home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-15 | 1.5 KB | 54 lines | [TEXT/MPS ] |
- #************** for compiling Installer test scripts *******
- #** This compiles a Rez source file (like "foo.r") into the
- #** resource file with the same basename ("foo") and in the
- #** same directory as the source file. It then copies the
- #** compiled Rez file into the directory specified by the
- #** variable "TestDirectory" as "Test Script" and launches
- #** the Installer from that directory.
- #* NOTE: If you select a file whose name doesn't end
- #* in ".r", the compilation won't take place.
- #*
-
- Set TestDirectory "::"
- export TestDirectory
-
- #*
- #* Blank out ®1 & ®2, and then set these to the active window.
- #* ®1: should contain the filename up to the .r extension, and
- #* ®2: should contain the .r extension.
- #*
-
- (Evaluate " " !~ /(" ")®1(" ")®2/) > Dev:Null
-
- IF "{Active}" =~ /≈.r/
- Set ScriptFile "'{Active}'"
- ELSE
- Set ScriptFile `getfilename -t TEXT -b Rez-N-Go`
- END
-
- #*
- #* Parse '.r' from filename.
- #*
-
- (Evaluate {ScriptFile} !~ /([a-zA-Z:0-9 .()-]*)®1(.r)®2/) > Dev:Null
-
- #*
- #* print time and rez the file if it ends in .r.
- #*
-
- IF "{®2}" == ".r"
- Echo " " ∑∑ "{WorkSheet}"
- Date ∑∑ "{WorkSheet}"
- Echo "rezzing-> {®1}{®2}" ∑∑ "{WorkSheet}"
- Echo " " ∑∑ "{WorkSheet}"
- rez -o "{®1}" -t kajr -c kajr "{®1}.r" ∑∑ "{WorkSheet}"
- Duplicate -y "{®1}" "{TestDirectory}Test Script"
- "{TestDirectory}Installer" ∑∑ "{WorkSheet}"
- Date ∑∑ "{WorkSheet}"
- ELSE
- Echo " " ∑∑ "{WorkSheet}"
- Echo "*** {ScriptFile} is not a Rez source file!! (name should end with .r)***" ∑∑ "{WorkSheet}"
- Echo " " ∑∑ "{WorkSheet}"
- END
-
-